<!-- header.html -->

<link rel="stylesheet" href="css/css/all.min.css">
<link rel="stylesheet" href="css/styles.css">
<header>
    <div class="container">
        <div class="header-content">
            <div class="logo">
                <i class="fas fa-running"></i>
                <span>跑者天地</span>
            </div>
            <nav>
                <ul>
                    <li><a href="index.html" class="nav-link">主页</a></li>
                    <li><a href="write.html" class="nav-link">写文章</a></li>
                    <li><a href="logout.html" class="nav-link">注销</a></li>
                </ul>
            </nav>
            
            <div class="user-actions">
                <div class="user-info">
                    <i class="fas fa-user-circle"></i>
                    <span id="ppp">跑者小明</span>
                </div>
                <a href="me.html" class="btn btn-secondary">个人中心</a>
            </div>
        </div>
    </div>
</header>

<script src="js/jquery.min.js"></script>
<script src="js/common.js"></script>
<script>

    $.ajax({ })

    $.ajax({
        type:"get",
        url:"user/getUserInfo",
        success:function (result){
            if(result.code=="SUCCESS"&&result.data!=null){
                $(".user-info #ppp").val(result.data.username)
            }
        }
    })
</script>